﻿<UserControl x:Class="Tulde.Windows.App.Controls.MediaPlayer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" >
   
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources\GlassButton.xaml"/>
                <ResourceDictionary Source="Resources\CustomProgressBar.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
      
       
        

    </UserControl.Resources>
    <StackPanel  Height="105" Background="{StaticResource DefaultGradient}">
       

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="72*"/>
                <ColumnDefinition Width="110*" />
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="51"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="51"/>

                <ColumnDefinition Width="182*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="25"/>
                <RowDefinition Height="55"/>
                <RowDefinition Height="35"/>

            </Grid.RowDefinitions>
            <Button Name="stop" Grid.Column="2" Grid.Row="1" Style="{StaticResource GlassButton}" Width="50" Height="50" Background="#FF1D5BBA"  Margin="2" >
                <Image Width="20" Height="20" Source="/MP3Tunes.WPF;component/Images/stop.png"/>

            </Button>
            <Button Name="previous" Grid.Column="3" Grid.Row="1" Style="{StaticResource GlassButton}" Width="40" Height="40" Background="#FF1D5BBA"  Margin="2" >
                <Image Width="15" Height="15" Source="/MP3Tunes.WPF;component/Images/previous.png"/>

            </Button>
            <Button Name="play" Grid.Column="4" Grid.Row="1" Style="{StaticResource GlassButton}" Width="50" Height="50" Background="#FF1D5BBA"  Margin="2">
                <Image Width="20" Height="20" Source="/MP3Tunes.WPF;component/Images/play.png" />

            </Button>
            <Button Name="pause" Visibility="Hidden" Grid.Column="4" Grid.Row="1" Style="{StaticResource GlassButton}" Width="50" Height="50" Background="#FF1D5BBA"  Margin="2" >
                <Image Width="20" Height="20" Source="/MP3Tunes.WPF;component/Images/pause.png"/>

            </Button>
            <Button Name="next" Grid.Column="5" Grid.Row="1"   Style="{StaticResource GlassButton}" Width="40" Height="40" Background="#FF1D5BBA"  Margin="2">
                <Image Width="15" Height="15" Source="/MP3Tunes.WPF;component/Images/next.png"/>
            </Button>

            <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="6" HorizontalAlignment="Right">

                <Button Name="mute"  Style="{StaticResource GlassButton}" Width="30" Height="30" Background="#344374"  Margin="2">
                    <Image x:Name="muteImage" Width="15" Height="15" Source="/MP3Tunes.WPF;component/Images/muted.png"/>
                </Button>
                <Slider Orientation="Vertical" Name="volume"  HorizontalAlignment="Right" Thumb.DragStarted="volume_DragStarted" Minimum="0" Maximum="1"  
                        Thumb.DragCompleted="volume_DragCompleted" ></Slider>
            </StackPanel>

            <!--<Slider x:Name="seekBar" Thumb.DragStarted="seekBar_DragStarted" Grid.Row="2" Grid.ColumnSpan="7" 
                        Thumb.DragCompleted="seekBar_DragCompleted"  />-->


            <ProgressBar x:Name="seekBar" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="7"  Style="{StaticResource BlueProgressBar}"></ProgressBar>


            <Grid Grid.ColumnSpan="7">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="400"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <ProgressBar x:Name="progress1" Style="{StaticResource PerformanceProgressBar}" Grid.ColumnSpan="2" IsIndeterminate="True" />
                <Viewbox  Grid.ColumnSpan="2" >
                    <TextBox Name="status" Grid.Column="1" Foreground="White" Background="Transparent" BorderThickness="0" Margin="0,5,5,0" HorizontalAlignment="Right"></TextBox>

                </Viewbox>

            </Grid>


        </Grid>

        <MediaElement Name="player" Grid.Row="0" Grid.Column="0"  ></MediaElement>
    </StackPanel>

</UserControl>
